<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>html5直接调用手机相机照相/录像</title>
</head>

<body>
</body>
<div>
    <h3>使用设备的面向用户的相机拍摄照片</h3>

    <form>
        <input type="file" name="image" accept="image/*" capture='camera' name="user">
        <input type="submit" value="照相上传">
    </form>
</div>
<div>
    <h3>使用面向环境的设备本地摄像机捕获视频：</h3>
    <form>
        <input type="file" name="video" accept="video/*" capture="environment">
        <input type="submit" value="录像上传">
    </form>
</div>


</html>